package com.pers.springcloud;

import com.pers.myrule.MySelfRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;


/**
 * @Author: 黄建
 * @Date: 2020/3/6 17:22
 */
@SpringBootApplication
//@MapperScan(basePackages = {"com.pers.springcloud.mapper"})
@EnableEurekaClient
//在启动该微服务的时候,就能去加载我们的自定义Ribbon配置类，从而使配置生效
//@RibbonClient(name = "CLOUD-PAYMENT-SERVICE",configuration = MySelfRule.class)
public class OrderMain80 {

   /* @Bean
    public MapperScannerConfigurer mapperScannerConfigurer() {
        MapperScannerConfigurer mapperScannerConfigurer = new MapperScannerConfigurer();
        mapperScannerConfigurer.setBasePackage("com.pers.springcloud.mapper");
        Properties propertiesMapper = new Properties();
        // 通用mapper位置，不要和其他mapper、dao放在同一个目录
        propertiesMapper.setProperty("mappers", "com.pers.springcloud.my.mapper.MyMapper");
        propertiesMapper.setProperty("notEmpty", "false");
        // 主键UUID回写方法执行顺序,默认AFTER,可选值为(BEFORE|AFTER)
        propertiesMapper.setProperty("ORDER", "BEFORE");
        mapperScannerConfigurer.setProperties(propertiesMapper);
        return mapperScannerConfigurer;
    }*/

    public static void main(String[] args) {
        SpringApplication.run(OrderMain80.class,args);
    }
}
